package com.bmit.clusterspring.service;

import com.bmit.clusterspring.mapper.ClusterLogMapper;
import com.bmit.clusterspring.mapper.InnerLogMapper;
import com.bmit.clusterspring.mapper.OuterLogMapper;
import com.bmit.clusterspring.model.ClusterLog;
import com.bmit.clusterspring.model.InnerLog;
import com.bmit.clusterspring.model.OuterLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = Exception.class)
public class LogServiceImpl implements LogService {

    @Autowired
    private ClusterLogMapper clusterLogMapper;

    @Autowired
    private InnerLogMapper innerLogMapper;

    @Autowired
    private OuterLogMapper outerLogMapper;

    @Override
    public void insertCLog(ClusterLog clusterLog) {
        clusterLogMapper.insert(clusterLog);
    }

    @Override
    public void insertILog(InnerLog log) {
        innerLogMapper.insert(log);
    }

    @Override
    public void insertOLog(OuterLog log) {
        outerLogMapper.insert(log);
    }
}
